CHR Exhaustive Execution - Revisited
نویسندگان
چکیده
Constraint Handling Rules (CHR) apply guarded rules to rewrite constraints in a constraint store, until a final state is reached in which no more rules are applicable. The rules cannot be retracted, therefore CHR does not backtrack over alternatives. In this paper, a novel source-to-source transformation is proposed, which transforms any given CHR program to one that backtracks over all possible alternatives. Accordingly, execution of the transformed program finds all possible results that are entailed from the complete search tree of the source program. Compared to a previous approach presented, the newly introduced transformation generates a search tree without redundant computations. Furthermore, the approach is generalized for all types of CHR rules.
منابع مشابه
Tips for CHR Programming
The intent this document is to describe advanced CHR programming with efficient execution in SWIProlog and SICStus Prolog. The document is compiled using the reference manuals of SWI-Prolog [1] and SICStus Prolog [2, 3]. The authors have taken the liberty to extract the relevant information and summarize into this single document for clarity and exhaustive presentation of the various tips and c...
متن کاملConcurrent goal-based execution of Constraint Handling Rules
We introduce a systematic, concurrent execution scheme for Constraint Handling Rules (CHR) based on a previously proposed sequential goal-based CHR semantics. We establish strong correspondence results to the abstract CHR semantics, thus guaranteeing that any answer in the concurrent, goal-based CHR semantics is reproducible in the abstract CHR semantics. Our work provides the foundation to obt...
متن کاملResult-directed CHR Execution
The traditional execution mode of CHR is bottom-up, that is, given a goal, the result is computed by exhaustively applying rules. This paper proposes a result-directed execution mode for CHR, to be used when both the goal and the result are known, and the task is to find all corresponding derivations. Result-directed execution is needed in the context of CHRiSM, a probabilistic extension of CHR...
متن کاملTermination Analysis of CHR Revisited
Today, there exist two distinct direct approaches to prove termination of CHR programs. Both are applicable on separate classes of CHR programs. One approach, by T. Frühwirth, proves termination of CHR programs without propagation rules. A second approach deals with CHR programs with propagation rules. Due to its extended scope to such programs, it fails to prove termination for a class of CHR ...
متن کاملTowards Inverse Execution of Constraint Handling Rules
Inverse execution is a non-deterministic process of discovering the inputs to a program starting from its output. This paper deals with the inverse execution of Constraint Handling Rules (CHR). First a simple inversion technique is proposed, which produces a reverse program consisting of rules with exchanged left and right hand sides. The limitations of this method are presented and reveal the ...
متن کامل